import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/directive',
    name: 'Directive',
    component: () => import('../views/Directive.vue')
  },
  {
    path: '/form',
    name: 'Form',
    component: () => import('../views/Form.vue')
  },
  {
	path : '/watch',
	component : () => import('../views/Watch')
  },
  {
    path : '/Cli',
    name: "Cli",
    component : () => import('../views/Cli')
  },
  {
    path : '/router',
    name : 'Router',
    component : () => import('../views/Router')
  },
  {
    path : '/vuex',
    name: 'Vuex',
    component : () => import('../views/Vuex')
  },
  {
    path: '/javascript/index',
    name: 'Javascript',
    component: () => import(/* webpackChunkName: "es6" */ '../views/Javascript/Index')
  },
  {
    path: '/javascript/regexp',
    name: 'RegExp',
    component: () => import(/* webpackChunkName: "es6" */ '../views/Javascript/RegExp')
  },
  {
    path: '/es6/index',
    name: 'ES6',
    component: () => import(/* webpackChunkName: "es6" */ '../views/ES6/Index')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
